import request from '@/utils/request'

export function login (params) {
  console.log(params)
  return request({
    url: '/app/login',
    method: 'post',
    data: params
  })
}
export function query (params) {
  return request({
    url: '/app/query',
    method: 'post',
    data: params
  })
}
export function create (params) {
  return request({
    url: '/app/create',
    method: 'post',
    data: params
  })
}
export function update (params) {
  return request({
    url: '/app/update',
    method: 'post',
    data: params
  })
}
export function deleteItem (params) {
  return request({
    url: '/app/delete',
    method: 'post',
    data: params
  })
}
export function createMany (params) {
  return request({
    url: '/app/createOneToMany',
    method: 'post',
    data: params
  })
}
export function updateMany (params) {
  return request({
    url: '/app/updateOneToMany',
    method: 'post',
    data: params
  })
}

export function resetPwd (params){
  return request({
    url:'/app/resetPwd',
    method: 'post',
    data:params
  })
}

export function getConfig () {
  return request({
    url: './assets/config.json',
    method: 'get'
  })
}